<template>
  <div class="set-box">
    <PageTitle>设置</PageTitle> 
    <div class="mine-header flex-box">
      <div class="left flex-box">
        <div class="head-box flex-box">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-gb-xiugaitouxiang"></use>
          </svg>
          <img src="@/assets/img/gb-pro-01.jpg">
        </div>
        <p>盐田王力宏</p>
      </div>
      <div class="right">
        <button>编辑</button>
      </div>
    </div>
    <div class="set-part">
      <div class="set-part-list flex-box">
        <p>收货地址</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
    </div>
    <div class="set-part">
      <div class="set-part-list flex-box">
        <p>修改手机</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
      <div class="set-part-list flex-box">
        <p>修改密码</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
      <div class="set-part-list flex-box">
        <p>修改邮箱</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
      <div class="set-part-list flex-box">
        <p>修改企业</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
    </div>
    <div class="set-part">
      <div class="set-part-list flex-box">
        <p>我的推荐</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
    </div>
    <div class="set-part">
      <div class="set-part-list flex-box">
        <p>账号合并</p>
        <p class="check-more-icon"><svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-gb-arrow-right"></use>
          </svg></p>
      </div>
    </div>
    <div class="sign-out-btn flex-box" @click="logout">
      退出登录
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
export default {
  name: 'mallMine',
  data() {
    return {
      lists: ''
    }
  },
  components: {},
  computed: {},
  methods: {
    logout() {
      this.$API.logout().then(res => {
        let logoutState = JSON.parse(res.match(/\{\S*\}/)[0]).logoutflag
        console.log(logoutState)
        if (logoutState === '0') {
          alert('退出登录成功')
        } else {
          alert('退出登录失败')
        }
      })
    }
  },
  mounted() {}
}
</script>
<style scoped lang="scss">
.set-box {
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  padding-bottom: 52px;
  box-sizing: border-box;
  overflow-y: auto;
}
.mine-header {
  justify-content: space-between;
  -webkit-justify-content: space-between;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  margin-bottom: 10px;
  .left {
    .head-box {
      width: 54px;
      height: 54px;
      border-radius: 54px;
      background: rgba($color: #4bc0eb, $alpha: 0.6);
      border: 1px solid #eee;
      position: relative;
      svg {
        font-size: 24px;
        color: #fff;
      }
      img {
        width: 100%;
        height: 100%;
        border-radius: 54px;
        overflow: hidden;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
    p {
      font-size: 16px;
      color: #000;
      margin-left: 10px;
      font-weight: bold;
      letter-spacing: 1px;
    }
  }
  .right {
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    button {
      padding: 4px 12px;
      font-size: 16px;
      font-size: 12px;
      color: #1c93d0;
      background: #fff;
      border-radius: 3px;
      border: 1px solid #1c93d0;
    }
  }
}
.set-part {
  width: 100%;
  margin-bottom: 10px;
  float: left;
  .set-part-list {
    width: 100%;
    float: left;
    padding: 15px 20px;
    box-sizing: border-box;
    background: #fff;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    font-size: 16px;
    color: #333;
    .check-more-icon {
      color: #ccc;
    }
  }
}
.sign-out-btn {
  position: fixed;
  width: 100%;
  left: 0;
  text-align: center;
  height: 52px;
  bottom: 0;
  background: #fff;
  font-size: 16px;
  color: #1c93d0;
}
</style>
